package cn.wolfcode.crm.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;


@Controller//IOC注解，将Controller交给Spring容器管理
public class LogoutController {

    //处理查询的请求
    @RequestMapping("/logout")
    public String login(HttpSession session) {

        //销毁session对象
        session.invalidate();
        //回到登录页面
        return "redirect:/login.jsp";
    }
}
